package com.yangchao.ch03

class example5 {
    /** 获取文件大小 **/
    public static void main(String[] args) {
        getfilesize()
    }
    static void getfilesize() {
        File file=new File("C:\\Users\\Administrator\\Desktop\\groovy_entry_to_mastery\\09文件与IO\\temp\\temp1.txt")
        /** 输出文件绝对路径和字节数 **/
        println("This file is [${file.absolutePath}] has ${file.length()} bytes")
    }
}